package cloud.alibaba.study.entity.order;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_order")
public class Order implements Serializable {

	/**TODO*/
	private static final long serialVersionUID = -532141060214953985L;

	@TableId(type = IdType.AUTO)
	private Long orderId;

	private String orderNo;
	
	private Long userId;

	private Long productId;

	private Integer count;

	private BigDecimal unitPrice;

	private BigDecimal totalPrice;
	
	private Integer orderType;

	/**
	 * 订单状态：0：创建中；1：已完结
	 */
	private Integer status;
	
	@TableField(fill = FieldFill.INSERT)
	private Date createTime;
	@TableField(fill = FieldFill.INSERT_UPDATE)
	private Date updateTime;
}
